package cn.cookyfly.dailyreview.client;

import com.google.gwt.user.client.rpc.RemoteService;

public interface RpcService extends RemoteService {
	
	/**
	 * @param loginId
	 * @param passwd
	 * @return result of logging in - "true":succeeded, 
	 * "false":failed due to login ID or password is not correct, 
	 * other cases: failed with messages for showing.
	 */
	String login(String loginId, String passwd);
	
	/**
	 * @return always return true
	 */
	Boolean logout();
	
	/**
	 * @return true: has logged in already (login info saved in Session); false: otherwise.
	 */
	Boolean checkLogin();
	
	/**
	 * save the review into database
	 * 
	 * @param reviewContent the content of the review to be saved. 
	 * must have the length of Review.getItemsNumber().
	 * @return true: saving succeeded. false: saving failed. (never be null)
	 */
	Boolean saveReview(String[] reviewContent);

}
